$file = "neighborresultstest90.txt";
open FILE, $file || die "cannot open the file for reading $!\n";
@lines = <FILE>;
close FILE;
$size = @lines; $size--;
push(@lines2, @lines[0]);
#new file 
for ($i = 1; $i < $size; $i++) {
	for ($j = 1; $j < $i; $j++)
	{
		if (@lines[$i] ne @lines[$j]) {
		push(@lines2, @lines[$i]);
		last;
		}
	}
	# if (@lines[$i] ne @lines[$i-1]) {
		# push(@lines2, @lines[$i]);
	# }
}
$file = join("",">final",$file);
open FILE2, $file || die "cannot open the file for writing !$ \n";;
foreach $elm(@lines2) {
	printf FILE2 $elm;
}
close FILE2;

print "done";
exit;